﻿using System;
using System.Configuration;

namespace C.Unite
{
    /// <summary>
    /// web.config操作类
    /// </summary>
    public sealed class ConfigHelper
    {
        /// <summary>
        /// 取得webconfig节点值
        /// </summary>
        /// <returns></returns>
        public static string GetWebConfigPath(string name)
        {
            return System.Configuration.ConfigurationManager.AppSettings[name];
        }

        /// <summary>
        /// 取得webconfig节点值
        /// </summary>
        /// <returns></returns>
        public static string GetConnstring(string name)
        {
            return ConfigurationManager.ConnectionStrings[name].ConnectionString;
        }
    }
}